package com.api.shopapi.service.impl;


import com.api.shopapi.entity.OrderTradeno;
import com.api.shopapi.mapper.OrderTradenoMapper;
import com.api.shopapi.service.OrderTradenoService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("OrderTradenoServiceImplOne")
public class OrderTradenoServiceImpl implements OrderTradenoService {

    @Autowired
    private OrderTradenoMapper orderTradenoMapper;

    @Override
    public int insert(OrderTradeno orderTradeno) {
        return orderTradenoMapper.insert(orderTradeno);
    }

    @Override
    public int delete(String orderTradeNoCode) {
        return orderTradenoMapper.delete(orderTradeNoCode);
    }

    @Override
    public int update(OrderTradeno orderTradeno) {
        return orderTradenoMapper.update(orderTradeno);
    }

    @Override
    public List<OrderTradeno> getList() {
        return orderTradenoMapper.getList();
    }

    @Override
    public OrderTradeno getByOrderTradenoCode(String orderTradeNoCode) {
        return orderTradenoMapper.getByOrderTradenoCode(orderTradeNoCode);
    }

    @Override
    public OrderTradeno getByTradeno(@Param("tradeno") String tradeno){
        return orderTradenoMapper.getByTradeno(tradeno);
    }

}
